home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Portable Parts / Patterns / PatternMatcher.h < prev   
Encoding:
Text File  |  2000-06-23  |  508 b   |  28 lines

  1. // PatternMatcher.h
  2.  
  3. #ifndef PatternMatcher_h
  4. #define PatternMatcher_h
  5.  
  6. #ifndef ConstData_h
  7. #include "ConstData.h"
  8. #endif
  9.  
  10. class PatternMatcher
  11.   {
  12.     private:
  13.         ConstData target;
  14.         uint8 advance[ maxuint8 + 1 ];
  15.     
  16.     public:
  17.         PatternMatcher( ConstData theTarget )    { SetTarget( theTarget ); }
  18.         
  19.         void SetTarget( ConstData );
  20.         ConstData Target() const                    { return target; }
  21.         
  22.         uint32 Length() const                        { return target.Length(); }
  23.         
  24.         uint8 Advance( uint8 c ) const            { return advance[c]; }
  25.   };
  26.  
  27. #endif
  28.